package _29define;

import java.io.FileInputStream;
import java.lang.reflect.Method;
import java.util.Properties;

public class Work2 {
    public static void main(String[] args) throws Exception {
        Work2 work2 = new Work2();
        work2.callTargetMethod("src/.editorconfig");

    }
    public void callTargetMethod(String configFilePath) throws Exception {
        Properties properties = new Properties();
        properties.load(new FileInputStream(configFilePath));
        String className=properties.getProperty("className");
        String methodName=properties.getProperty("methodName");
        Class<?> c=Class.forName(className);
        Method method=c.getDeclaredMethod(methodName);
        Object a=c.newInstance();
        method.invoke(a);
    }
}



